forum

Home / DeveloperSection / Forums / How to Bind textbox to Model?

How to Bind textbox to Model?

Gaurpriya Bishnoi 1984 07-Jul-2015
foreach (var item in Model)
{
    <tr>
      <td class="well"> @Html.TextBoxFor(m => item.UserMaster.D1, new { @class = "form-control" })</td>
     <td class="well"> @Html.TextBoxFor(m => item.UserMaster.D2, new { @class = "form-control" })</td>
     <td class="well"> @Html.TextBoxFor(m => item.UserMaster.D3, new { @class = "form-control" })</td>
     <td class="well"> @Html.TextBoxFor(m => item.UserMaster.D4, new { @class = "form-control" })</td>
     <td class="well"> @Html.TextBoxFor(m => item.UserMaster.D5, new { @class = "form-control" })</td>
     <td class="well"> @Html.TextBoxFor(m => item.UserMaster.D6, new { @class = "form-control" })</td>
     <td class="well"> @Html.TextBoxFor(m => item.UserMaster.D7, new { @class = "form-control" })</td>
     <td class="well"> @Html.TextBoxFor(m => item.UserMaster.D8, new { @class = "form-control" })</td>
    </tr>
}

I am want to make these textbox inside for loop how to possible



Updated on 09-Jul-2015

Can you answer this question?


Answer

3 Answers

Liked By